using System.ComponentModel;
using BTOps;

/// <summary>
/// Summary description for BTSchemaOperations
/// </summary>
[DataObject]
public class BTSchemaOperations
{
    [DataObjectMethod(DataObjectMethodType.Select, true)]
    public BTSchema[] ListSchemas(string applicationName)
    {
        Operations btOps = new Operations();
        return btOps.Schemas(applicationName, "");
    }

    [DataObjectMethod(DataObjectMethodType.Select, false)]
    public BTSchema[] ListSchemaByName(string applicationName, string name)
    {
        Operations btOps = new Operations();
        return btOps.Schemas(applicationName, name);
    }

    [DataObjectMethod(DataObjectMethodType.Select, false)]
    public BTSchema[] ListDocumentSchemas(string applicationName)
    {
        Operations btOps = new Operations();
        return btOps.SchemasByType(applicationName, "Document");
    }

    [DataObjectMethod(DataObjectMethodType.Select, false)]
    public BTSchema[] ListPropertySchemas(string applicationName)
    {
        Operations btOps = new Operations();
        return btOps.SchemasByType(applicationName, "Property");
    }
}